import 'package:flutter_easyloading/flutter_easyloading.dart';

/// 曝光遮罩
/// 全局加载组件，如摄影中的曝光过程般显示加载状态
class ExposureOverlay {
  /// 显示曝光遮罩（曝光过程）
  static void reveal({String? message}) {
    EasyLoading.show(
      status: message ?? 'Loading...',
      maskType: EasyLoadingMaskType.black,
    );
  }

  /// 隐藏曝光遮罩（结束曝光）
  static void conceal() {
    EasyLoading.dismiss();
  }

  /// 检查是否正在显示
  static bool get isVisible => EasyLoading.isShow;
}
